import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/index'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [
      {
        path:'',
        name:'Discover',
        component:()=>import('../views/index/discover.vue')
      },
      {
      path: 'toplist',
      name: 'Toplist',
      component: () => import('../views/index/toplist.vue')
    },
    {
      path: 'playlist',
      name: 'Playlist',
      component: () => import('../views/index/playlist.vue')
    },
    {
      path: 'djradio',
      name: 'Djradio',
      component: () => import('../views/index/djradio.vue')
    },
    {
      path: 'artist',
      name: 'Artist',
      component: () => import('../views/index/artist.vue')
    },
    {
      path: 'album',
      name: 'Album',
      component: () => import('../views/index/album.vue')
    }
  ]
  },
  {
    path: '/my',
    name: 'My',
    component: () => import('../views/my.vue')
  },
  {
    path: '/friend',
    name: 'Friend',
    component: () => import('../views/friend.vue')
  },
  {
    path: '/store',
    name: 'Store',
    component: () => import('../views/store.vue')
  },
  {
    path: '/musician',
    name: 'Musician',
    component: () => import('../views/musician.vue')
  }, {
    path: '/download',
    name: 'Download',
    component: () => import('../views/download.vue')
  },
  {
    path:'/detail',
    name:'Detail',
    component:()=>import('../views/index/detail.vue')
  }
  
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
